import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../components/index.vue'
import HomeViewVue from '@/views/HomeView.vue'
import RoomShowVue from '@/views/RoomShow.vue'
import StudentShowVue from '@/views/StudentShow.vue'
import MainShowVue from '@/views/MainShow.vue'
Vue.use(VueRouter)

const routes = [
  {
    name:'login',
    path:'/login',
    component:login
  },
  {
    name:'home',
    path:'/home',
    component:HomeViewVue,
    children:[

      {
        name:'main',
        path:'main',
        component:MainShowVue
      },
      {
        name:'roomshow',
        path:'roomshow',
        component:RoomShowVue
      },
      {
        name:'studentshow',
        path:'studentshow',
        component: StudentShowVue
      }
    ]
    
  }
]

const router = new VueRouter({
  routes
})

export default router
